//
//  APIConnection.h
//  Ezi2u
//
//  Created by mac on 16/9/26.
//  Copyright © 2016年 mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworking.h>

typedef void(^APIFinish)(id data,NSString *message);
typedef void(^Error)(NSString *errorInfor);

@interface APIConnection : NSObject
+ (APIConnection *) shareInstance ;
- (void) get:(NSString *)url
         apiFinish:(APIFinish)apiFinish
    netError:(Error)netError;
- (void) post:(NSString *)url
         data:(NSDictionary *)data
    apiFinish:(APIFinish)apiFinish
  netError:(Error)netError;
@end
